//
//  Heap.h
//  TecnicheDiProgrammazione
//
//

#ifndef TecnicheDiProgrammazione_Heap_h
#define TecnicheDiProgrammazione_Heap_h
#include "TInfo.h"

typedef struct SHeap THeap;

THeap* heap_create();
void heap_destroy(THeap *h);
void heap_insert(THeap *h, TInfo info);
void heap_delete(THeap *h, int key);
void heap_delete_at_index(THeap *h, int i);
TInfo* heap_get(THeap *h, int key);
TInfo* heap_get_at_index(THeap *h, int i);
THeap* build_max_heap(TInfo info[], int size);
void heap_sort(TInfo v[], int size);
void heap_set_key(THeap *h, int i, int newKey);

#endif
